package com.loves.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.loves.admin.mapper.provider.UserProvider;
import com.loves.admin.model.User;
import com.loves.admin.vo.UserExportVO;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;

public interface  UserMapper extends BaseMapper<User> {

    @Select("select * from user where delete_flag = false and age = #{age}")
    IPage<User> selectPageVo(Page<User> page,int age);

    @SelectProvider(type = UserProvider.class, method = "findByExport")
    List<UserExportVO> findByExport();

}
